﻿using BusinessLogicLayer;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PresentationLayer
{
    public partial class ChiTietSachForm : Form
    {
        public Sach Sach { get; set; }
        public NXB NXB { get; set; }
        public ChiTietSachForm()
        {
            InitializeComponent();
        }

        private void ChiTietSachForm_Load(object sender, EventArgs e)
        {
            if (Sach.MaSach != "")
            {
                txtMaSach.Text = Sach.MaSach;
                txtTenSach.Text = Sach.TenSach;
                txtMaNXB.Text = Sach.NXB;
                txtTenNXB.Text = Sach.NXB1.TenNXB;
                txtMoTa.Text = Sach.NXB1.MoTa;
                txtTacGia.Text = Sach.TacGia;
                txtMaTheLoai.Text = Sach.TheLoai;
                txtTenTheLoai.Text = Sach.TheLoai1.TenTheLoai;
                txtSoTrang.Text = Convert.ToString(Sach.SoTrang);
                txtNamXB.Text = Convert.ToString(Sach.NamXB);
                txtGia.Text = Convert.ToString(Sach.Gia);
                
            }
        }
    }
}
